from appium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
import os,time
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from base import Base
class SousuoPage(Base):
    sousuokuang=(By.ID,'com.kongfz.app:id/ll_search')
    shurukuang=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.EditText')
    sousuoanniu=(By.XPATH,'//android.widget.TextView[@text="搜索"]')
    dy=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/tvHitLeft"]')
    def sousuoyewu(self,filepath):
        self.find_ele(self.sousuokuang).click()
        sleep(2)
        self.find_ele(self.shurukuang).send_keys(filepath)
        sleep(2)
        self.find_ele(self.sousuoanniu).click()
        sleep(2)


